{template 'common/header'}

<ul class="nav nav-tabs">

	<li {if $do == 'modlist'}class="active"{/if}><a href="{php echo url('members/mrecord/modlist');}">模块购买记录</a></li>

	<li {if $do == 'paylist' && !$id}class="active"{/if}><a href="{php echo url('members/mrecord/paylist');}">用户充值记录</a></li>

</ul>
{if $do == 'paylist'}
	<div class="panel panel-default">
		<div class="panel-body table-responsive">
			<table class="table">
				<thead>
				<tr>
					{if ($_W['isfounder'])}<th class="row-first">会员账号</th>{/if}
					<th>货币</th>
					<th>订单号</th>
                    <th>充值金额</th>
					<th>充值时间</th>
					<th>状态</th>
				</tr>
				</thead>
				<tbody>
                            {loop $list $item}
                            <tr>
								{if ($_W['isfounder'])}<td class="col-sm-2">{if $user[$item['uid']]['username']}{$user[$item['uid']]['username']}{else}改用户已删除{/if}</td>{/if}
                                <td class="col-sm-2">{if $item['credittype']=='credit2'}余额{else}积分{/if}</td>
                                <td>{$item['orderid']}</td>
                                <td class="col-sm-1">{$item['money']}</td>
                                <td>{php echo date('Y-m-d H:i',$item['order_time'])}</td>
                                <td>{if $item['status']==1}<span class="label label-success">已付款</span>{else}<span class="label label-warning">待付款</span>{/if}</td>
                            </tr>
                            {/loop}
                            </tbody>
                        </table>
                    </div>
                </div>
{/if}
{if $do == 'modlist'}
                <div class="panel panel-default">
                    <div class="panel-heading">消费日志</div>
                    <div class="panel-body">
                        <table class="table mytable table-striped b-t text-sm">
                            <thead>
                            <tr>
                                <th width="20"></th>
								{if ($_W['isfounder'])}<th>消费公众号</th>{/if}
                                <th class="col-sm-2">金额</th>
                                <th>消费原因</th>
                                <th class="col-sm-2">购买时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            {loop $list $item}
                            <tr>
                                <td width="20"></td>
								{if ($_W['isfounder'])}<td>{if $uni[$item['uniacid']]['name']}{$uni[$item['uniacid']]['name']}{else}公众号已删除{/if}</th>{/if}
                                <td>{$item['num']}</td>
                                <td class="col-sm-1">{php echo htmlspecialchars_decode($item['remark'])}</td>
                                <td>{php echo date('Y-m-d H:i',$item['createtime'])}</td>
                            </tr>
                            {/loop}
                            </tbody>
                        </table>
                    </div>
					
                </div>
{/if}
{$pager}
{template 'common/footer'}